<?php 
	require_once '../function.php';
	
	if (empty($_GET['id'])) {
		exit('<h1>参数错误</h1>');
	}

	$id = $_GET['id'];

	$affected_row = xiu_operation_db('delete from posts where id in ('.$id.');');

	if ($affected_row <= 0) {
		exit('<h1>删除失败</h1>');
	}

	header('Location: '.$_SERVER['HTTP_REFERER']);